package com.easy.west.westclient.api.user.api;

import com.easy.west.westclient.api.user.bean.FollowList;
import com.easy.west.westclient.api.user.bean.UserList;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface UserService {

    /**
     * 关注自己的列表
     * @param num
     * @param ownerid
     * @return
     */
    @POST("follows/get/follower")
    @FormUrlEncoded
    Call<UserList> getMyfollowerList(@Field("num")int num,@Field("ownerId")long ownerid);

    /**
     *获取自己的关注
     * @param num
     * @param access_token
     * @return
     */
    @POST("follows/get/followsroom")
    @FormUrlEncoded
    Call<FollowList> getMyfollowlist(@Field("num")int num, @Field("access_token")String access_token);

    /**
     * 查看是否关注
     * @param accesstoken
     * @param target_id
     * @return
     */
    @POST("follows/get/isfollowed")
    @FormUrlEncoded
    Call<Boolean> isfollow(@Field("access_token")String accesstoken,@Field("targetId")long target_id);

    /**
     * 取消关注
     * @param target_id
     * @param access_token
     * @return
     */
    @POST("follows/delete")
    @FormUrlEncoded
    Call<String> cancelFollow(@Field("targetId")long target_id,@Field("access_token")String access_token);

    /**
     * 关注某人
     * @param access_token
     * @param ownerId
     * @param targetId
     * @return
     */
    @POST("follows/create")
    @FormUrlEncoded
    Call<String> follow(@Field("access_token")String access_token,@Field("ownerId")long ownerId,@Field("followedId")long targetId);

}
